const { override, addDecoratorsLegacy, adjustStyleLoaders } = require("customize-cra");

module.exports = override(
  addDecoratorsLegacy(),
  adjustStyleLoaders(rule => {
    if (rule.test.toString().includes("scss")) {
      rule.use.push({
        loader: require.resolve("sass-resources-loader"),
        options: {
          resources: "./src/styles/index.scss" //这里是你自己放公共scss变量的路径
        }
      });
    }
  })
);